#version 460
#extension GL_GOOGLE_include_directive : enable






layout(location = 0) in vec4 vColor;
layout(location = 1) in vec3 vNormal;
layout(location = 2) in vec3 vLightPos[4];
//layout(location = 6) in flat uint vInstanceIndex;

layout(location=0) out vec4 outColor;




//layout(std140, set=0, binding=3) uniform U_Matrix {
//	uint m_Color;
//};



void main(void) {
	float d = (dot(vLightPos[0], vNormal)) + 1.0;
	float PN = dot(vLightPos[0], vNormal);

	//vec4 Color = f_glsl_buildColor(InstanceColor[vInstanceIndex]);
	

	//gl_BaseInstance;
	outColor = vec4(vColor.rgb * d * 0.5, vColor.a);
	//outColor = vec4(Color.rgb * d, Color.a);
	//outColor.rgb += vec3(0.2, 0.21, 0.22) * d;
	/*if(PN >= 0){
		outColor.rgb = vec3(0,0,1);
	} else {
		outColor.rgb = vec3(1,0,0);
	}*/
}



